package com.jerry.BO;

import lombok.Data;

import java.util.Objects;

@Data
public class ServerInfo {
    private String serverId;
    private String host;
    private Integer port;
    private Long timeStamp;
    private boolean isAlive;

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        ServerInfo that = (ServerInfo) o;
        return serverId.equals(that.serverId) &&
                host.equals(that.host) &&
                port.equals(that.port);
    }

    @Override
    public int hashCode() {
        return Objects.hash(serverId, host, port);
    }
}
